package com.favccxx.search.infrastructure.exception;

import lombok.Getter;

/**
 * @author favccxx
 */
@Getter
public class AppException extends RuntimeException {

    private final int errorCode;

    private final String errorMessage;

    public AppException(int errorCode, Object... args){
        this.errorCode = errorCode;
        this.errorMessage = ExceptionHelper.getExceptionMessage(String.valueOf(errorCode), args);
    }

}
